package com.example.recordingpen_datacollection.Text;

import com.example.recordingpen_datacollection.Utils.DateUtils.TimeJudgeUtils;
import org.junit.jupiter.api.Test;

public class statement {
    @Test
    public void test1(){
        String str = "前台到今天有哪些会议";
        if(str.length()>20){
            str = str.substring(0,20);
        }
        //时间段
        String beginDate = null;
        String endDate = null;
        boolean fale = false;
        if(!str.contains("会议")){
            System.out.println("第零部分");
            System.out.println("开始时间 "+beginDate);
            System.out.println("结束时间 "+endDate);
            System.out.println("fale "+fale);
            return;
        } else {
            fale = true;
        }
        if(str.contains("今天") &&(!str.contains("昨天")&& !str.contains("前天"))){

             beginDate = TimeJudgeUtils.addNowDayTime(0)+" 00:00:00";
             endDate = TimeJudgeUtils.addNowDayTime(0)+" 23:59:59";

        } else if(str.contains("昨天") &&(!str.contains("今天")&& !str.contains("前天")) ) {

            beginDate = TimeJudgeUtils.addNowDayTime(-1)+" 00:00:00";
            endDate = TimeJudgeUtils.addNowDayTime(-1)+" 23:59:59";

        } else if(str.contains("前天") &&(!str.contains("今天")&& !str.contains("昨天")) ) {

            beginDate = TimeJudgeUtils.addNowDayTime(-2)+" 00:00:00";
            endDate = TimeJudgeUtils.addNowDayTime(-2)+" 23:59:59";

        }
        if(beginDate != null && endDate!= null){
            System.out.println("第一部分");
            System.out.println("开始时间 "+beginDate);
            System.out.println("结束时间 "+endDate);
            System.out.println("fale "+fale);
            return;
        }

        if( str.contains("今天") && str.contains("昨天") ){

            beginDate = TimeJudgeUtils.addNowDayTime(-1)+" 00:00:00";
            endDate = TimeJudgeUtils.addNowDayTime(0)+" 23:59:59";

        } else if( str.contains("昨天") && str.contains("前天") ){

            beginDate = TimeJudgeUtils.addNowDayTime(-2)+" 00:00:00";
            endDate = TimeJudgeUtils.addNowDayTime(-1)+" 23:59:59";

        } else if(str.contains("今天") && str.contains("前天") ) {

            beginDate = TimeJudgeUtils.addNowDayTime(-2)+" 00:00:00";
            endDate = TimeJudgeUtils.addNowDayTime(0)+" 23:59:59";

        }

        if(beginDate != null && endDate!= null){
            System.out.println("第二部分");
            System.out.println("开始时间 "+beginDate);
            System.out.println("结束时间 "+endDate);
            System.out.println("fale "+fale);

            return;
        }
    }
    @Test
    public void test2() {
        String str = "以下是一场会议内容记录，你是一名秘书，需要对会议的内容进行整理和总结，并提供会议摘要和大纲，每条大纲包含一条或多条子项，并按照以下格式输出：会议主题xxxxxxxxx 会议摘要xxxxxxxxx 会议大纲 1. xxxxxxxxx- xxxxxxxxx- xxxxxxxxxx2. xxxxxxxxx- xxxxxxxxx。内容如下 ：As the calendar flipped to a brand new year, the air quality indicators across numerous urban landscapes presented a refreshing narrative of environmental progress. The festive season, traditionally marked by a surge in air pollution due to extensive fireworks displays, witnessed a remarkable transformation this time. Thanks to heightened public awareness and concerted efforts by environmental organizations, the use of fireworks dwindled, leading to a substantial drop in particulate matter and other harmful pollutants.\n" +
                "\n" +
                "The dawn of the New Year greeted residents with a crisp, clean air that seemed to whisper promises of a healthier tomorrow. The sky, devoid of the usual haze, shone in a vibrant blue, casting an optimistic glow over bustling metropolises. The reduction in air pollution was not just a coincidence; it was a culmination of individual actions and collective advocacy that prioritized sustainable practices over short-lived revelry.\n" +
                "\n" +
                "Authorities played a pivotal role in this positive shift by enforcing stricter regulations on industrial emissions and promoting green initiatives. Cities embraced electric public transportation, encouraged the use of bicycles, and implemented car-free zones during peak festive hours, further contributing to the improvement in air quality.\n" +
                "\n" +
                "Moreover, the media's relentless coverage of air pollution issues and its impact on health sparked a national conversation, urging citizens to adopt eco-friendl";
        System.out.println(str);
        boolean a = false;
        //

    }

    @Test
    public void test3() {
        String a = "";
      String  content= "以下是一场会议内容记录，你是一名秘书，需要对会议的内容进行整理和总结，并提供会议摘要和大纲，每条大纲包含一条或多条子项，并按照以下格式输出：会议主题xxxxxxxxx 会议摘要xxxxxxxxx 会议大纲 1. xxxxxxxxx- xxxxxxxxx- xxxxxxxxxx2. xxxxxxxxx- xxxxxxxxx。会议内容如下：As the calendar flipped to a brand new year, the air quality indicators across numerous urban landscapes presented a refreshing narrative of environmental progress. The festive season, traditionally marked by a surge in air pollution due to extensive fireworks displays, witnessed a remarkable transformation this time. Thanks to heightened public awareness and concerted efforts by environmental organizations, the use of fireworks dwindled, leading to a substantial drop in particulate matter and other harmful pollutants.The dawn of the New Year greeted residents with a crisp, clean air that seemed to whisper promises of a healthier tomorrow. The sky, devoid of the usual haze, shone in a vibrant blue, casting an optimistic glow over bustling metropolises. The reduction in air pollution was not just a coincidence; it was a culmination of individual actions and collective advocacy that prioritized sustainable practices over short-lived revelry.Authorities played a pivotal role in this positive shift by enforcing stricter regulations on industrial emissions and promoting green initiatives. Cities embraced electric public transportation, encouraged the use of bicycles, and implemented car-free zones during peak festive hours, further contributing to the improvement in air quality.Moreover, the media's relentless coverage of air pollution issues and its impact on health sparked a national conversation, urging citizens to adopt eco-friendl";
        String iScontent= content.replaceAll("以下是一场会议内容记录，你是一名秘书，需要对会议的内容进行整理和总结，并提供会议摘要和大纲，每条大纲包含一条或多条子项，并按照以下格式输出：会议主题xxxxxxxxx 会议摘要xxxxxxxxx 会议大纲 1. xxxxxxxxx- xxxxxxxxx- xxxxxxxxxx2. xxxxxxxxx- xxxxxxxxx。会议内容如下：","");
        iScontent = iScontent.replaceAll("以下是一場會議內容記錄，你是一名秘書，需要對會議的內容進行整理和總結，並提供會議摘要和大綱，每條大綱包含一條或多條子項，並按照以下格式輸出：會議主題 會議摘要 xxxxxxxxx 會議大綱1. xxxxxxxxx- xxxxxxxxx- xxxxxxxxxx2. xxxxxxxxx- xxxxxxxxx。 會議內容如下:","");
        int iScontentLength = iScontent.getBytes().length;
        System.out.println(iScontentLength +"=="+iScontent.length());
        if(iScontentLength == iScontent.length()){
            content = content.replaceAll("以下是一场会议内容记录，你是一名秘书，需要对会议的内容进行整理和总结，并提供会议摘要和大纲，每条大纲包含一条或多条子项，并按照以下格式输出：会议主题xxxxxxxxx 会议摘要xxxxxxxxx 会议大纲 1. xxxxxxxxx- xxxxxxxxx- xxxxxxxxxx2. xxxxxxxxx- xxxxxxxxx。会议内容如下：",
                    "The following is a meeting minutes, you are a secretary, need to organize and summarize the contents of the meeting, and provide the meeting summary and outline, each outline contains one or more sub-items, and output in the following format: Meeting topic xxxxxxxxx Meeting abstract xxxxxxxxx Meeting outline 1. Xxxxxxxxx-xxxxxxxxx-xxxxxxxxxxxx2. Xxxxxxxxx-xxxxxxxxx - xxxxxxxxx. The meeting will be as follows:");
            content = content.replaceAll("以下是一場會議內容記錄，你是一名秘書，需要對會議的內容進行整理和總結，並提供會議摘要和大綱，每條大綱包含一條或多條子項，並按照以下格式輸出：會議主題 會議摘要 xxxxxxxxx 會議大綱1. xxxxxxxxx- xxxxxxxxx- xxxxxxxxxx2. xxxxxxxxx- xxxxxxxxx。 會議內容如下:",
                    "The following is a meeting minutes, you are a secretary, need to organize and summarize the contents of the meeting, and provide the meeting summary and outline, each outline contains one or more sub-items, and output in the following format: Meeting topic xxxxxxxxx Meeting abstract xxxxxxxxx Meeting outline 1. Xxxxxxxxx-xxxxxxxxx-xxxxxxxxxxxx2. Xxxxxxxxx-xxxxxxxxx - xxxxxxxxx. The meeting will be as follows:");
        }
        System.out.println(content);
    }

}
